<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/compare.css" media="screen">
<div id="content">
  <div class="top">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center">
      <h1><?php echo $heading_title; ?></h1>
    </div>
  </div>
    <form action="" method="post" >
  <div class="middle">
        <table id="productsCompare" cellpadding="0" cellspacing="0" border="0">
      <tbody>
      <tr>
        <th>Name</th>
            <?php foreach ($products as $product) { ?>
            <th class="col<?php echo $product['key']; ?>"><span class="productname"><?php echo $product['name']; ?></span></th>
            <?php } ?>
            </tr>
      <tr>
        <th>Image</th>
            <?php foreach ($products as $product) { ?>
            <td class="prodImage col<?php echo $product['key']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></td>
            <?php } ?>
      </tr>
      <tr>
        <th>Price</th>
        <?php foreach ($products as $product) { ?>
                  <td class="col<?php echo $product['key']; ?>">
                             <span class="price">$<?php echo $product['price']; ?></span><br>
                                  </td>
                 <?php } ?>
              </tr>
      <tr>
        <th></th>
        <?php foreach ($products as $product) { ?>
                  <td class="buynow col<?php echo $product['key']; ?>"><a class="button" href="<?php echo $product['href']; ?>"><span>Buy Now!</span></a>
              </td>
              <?php } ?>
              </tr>
      <tr>
        <th>Model</th>
        <?php foreach ($products as $product) { ?>
                  <td class="col<?php echo $product['key']; ?>"><span class="productmodel"><?php echo $product['model']; ?></span></td>
                  <?php } ?>
              </tr>
      <tr>
        <th>SKU</th>
        <?php foreach ($products as $product) { ?>
                  <td class="col<?php echo $product['key']; ?>"><span class="productsku"></span></td>
                  <?php } ?>
              </tr>
      <tr>
        <th valign="top">Description</th>
        <?php foreach ($products as $product) { ?>
        <td class="col<?php echo $product['key']; ?>" valign="top"><span class="productdescription"><div>
        <?php echo $product['description']; ?>	
        </div>
        </span></td>
        <?php } ?>
        </tr>
      <tr>
        <th>Manufacturer</th>
        <?php foreach ($products as $product) { ?>
          <td class="col<?php echo $product['key']; ?>"><span class="productmanufacturer"><?php echo $product['manufacturer']; ?></span></td>
        <?php } ?>
      </tr>
      <tr>
        <th>Availability</th>
        <?php foreach ($products as $product) { ?>
        <td class="col<?php echo $product['key']; ?>"><span class="productavailability"><?php echo $product['stock']; ?></span></td>
        <?php } ?>
      </tr>
      <tr>
        <th><b>Rating</b></th>
        <?php foreach ($products as $product) { ?>
        <td class="col<?php echo $product['key']; ?>">
        <?php echo $product['rating']; ?>
        </td>
        <?php } ?>
      </tr>
        <tr>
         <th></th>
         <?php foreach ($products as $product) { ?>
         <td class="col<?php echo $product['key']; ?> remove"><a class="button" onclick="doCompare('remove', '<?php echo $product['key']; ?>'); $('.col<?php echo $product['key']; ?>').hide();"><span>Remove</span></a></td>
         <?php } ?>
        </tr>
    </tbody>
    </table>
      </div>
        </form>
  <div class="bottom">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center"></div>
  </div>
</div>
<script type="text/javascript"><!--
$('#content_search input').keydown(function(e) {
	if (e.keyCode == 13) {
		contentSearch();
	}
});

function contentSearch() {
	url = 'index.php?route=product/search';
	
	var keyword = $('#keyword').attr('value');
	
	if (keyword) {
		url += '&keyword=' + encodeURIComponent(keyword);
	}

	var category_id = $('#category_id').attr('value');
	
	if (category_id) {
		url += '&category_id=' + encodeURIComponent(category_id);
	}
	
	if ($('#description').attr('checked')) {
		url += '&description=1';
	}
	
	if ($('#model').attr('checked')) {
		url += '&model=1';
	}

	location = url;
}
//--></script>
<?php echo $footer; ?> 